package me.project.android.client;

import cn.soboys.restapispringbootstarter.Result;
import me.project.android.client.fallback.AndroidClientFallBack;
import me.project.android_common.domain.AndroidInfo;
import me.project.android_common.domain.DataPoint;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "gift-user",fallback = AndroidClientFallBack.class)
public interface AndroidClient {
    //http远程调用
    @PostMapping("/user")
    Result addOrUpdate(@RequestBody DataPoint dataPoint);

    @PutMapping("/userInfo")
    Result addOrUpdate(@RequestBody AndroidInfo androidInfo);

    //获取用户
    @GetMapping("/userIfo/getById/{id}")
    Result getById(@PathVariable("id")Long id);

    //获取用户
    @GetMapping("/user/getByLoginId/{id}")
    Result getByLoginId(@PathVariable("id")Long id);
}